<html>
	<head>
		<meta charset="utf-8">
		<title>鼠标移入移出改变样式</title>
		<style type="text/css">
		    body{color: #fff;}
			#list{width:200px;height:200px;background-color:#272822;margin: 0 auto;}
		</style>
	</head>
	<body>
		<div id="list">鼠标移入移出改变样式</div>
	</body>
	<script type="text/javascript">
		window.onload=function  () {
			var odiv=document.getElementById('list');
			odiv.onmouseover=function  () {
				odiv.style.backgroundColor="red";
			}
			odiv.onmouseout=function  () {
				odiv.style.backgroundColor="#000";
			}
		}
	</script>
</html>
